#pragma once
#include "mkvparserstream.hpp"

namespace MkvParser
{

class VideoTrack;

class VideoStream : public Stream
{
    explicit VideoStream(VideoTrack*);    
    VideoStream(const VideoStream&);
    VideoStream& operator=(const VideoStream&);
    
public:
    static VideoStream* CreateInstance(VideoTrack*);
    
    void GetMediaTypes(CMediaTypes&) const;
    HRESULT QueryAccept(const AM_MEDIA_TYPE*) const;
    HRESULT UpdateAllocatorProperties(ALLOCATOR_PROPERTIES&) const;

#if 0  //TODO: use this for incremental loading
    HRESULT PopulateSample(IMediaSample*, __int64&);
#endif

    long GetBufferSize() const;
    //HRESULT PopulateSample(IMediaSample*);

protected:
    std::wostream& GetKind(std::wostream&) const;
    HRESULT OnPopulateSample(const Block* pNext, IMediaSample* pSample) const;

    void GetMpeg2MediaTypes(CMediaTypes&) const;
    void GetVp8MediaTypes(CMediaTypes&) const;

};


}  //end namespace MkvParser
